package logic;

import java.awt.*;

public class LPlayer {
/*
 * Atributes
 */
	private String playerName;
	private int playerGold;
	private Integer playerId;
	private Board playerBoard;
	private Rectangle castleRect;
/*
 * Constructors
 */	
	public LPlayer(String name, Integer id){
		playerName = name;
		playerGold = 100;
		playerId = id;
		playerBoard = new Board();
	}
	
/*
 * Getters
 */
	public int get_player_gold(){
		return playerGold;
	}
	
	public Integer get_player_id(){
		return playerId;
	}
	
	public String get_player_name(){
		return playerName;
	}
	
	public Board get_player_board(){
		return playerBoard;
	}
	
	public Rectangle get_castle_position(){
		return castleRect;
	}

/*
 * Setters
 */
	public boolean set_castle_position(Rectangle rect){
		if(rect.x + rect.width < playerBoard.get_board_width() || rect.y + rect.height < playerBoard.get_board_height()){
			castleRect = rect;
			return true;
		}
		return false;
	}
}
